package com.gitee.cui.springcloud.account.service.impl;

import java.math.BigDecimal;

import javax.annotation.Resource;

import com.gitee.cui.springcloud.account.dao.AccountDao;
import com.gitee.cui.springcloud.account.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-26 16:07
 **/
@Service
@Slf4j
public class AccountServiceImpl implements AccountService {

	@Resource
	private AccountDao accountDao;

	@Override
	public void decrease(Long userId, BigDecimal money) {
		log.info("------------>开始扣账户余额，扣除金额：{}", money);
		accountDao.decrease(userId, money);
		log.info("------------>扣账户余额end");
	}
}
